﻿using System;
using System.Collections.Generic;

namespace Meqs.Entity
{
    /// <summary>
    /// 学校信息
    /// </summary>
    [Serializable]
    public class SchoolInfo
    {
        public SchoolInfo(int mRid, string mSchoolCode, string mSchoolMark, int mAreaID, string mSchoolName, short mSchoolOpt, int mSchoolYear, byte mSchoolTerm, bool? mISEffect)
        {
            m_RID = mRid;
            m_SchoolCode = mSchoolCode;
            m_SchoolMark = mSchoolMark;
            m_AreaID = mAreaID;
            m_SchoolName = mSchoolName;
            m_SchoolOpt = mSchoolOpt;
            m_SchoolYear = mSchoolYear;
            m_SchoolTerm = mSchoolTerm;
            m_IsEffect = mISEffect;
        }

        public SchoolInfo()
        {
            m_RID = 0;
            m_SchoolCode = null;
            m_SchoolMark = null;
            m_SchoolName = null;
            m_SchoolOpt = 0;
            m_SchoolYear = 0;

        }

        #region RID

        private int m_RID;

        public int RID
        {
            get { return m_RID; }
            set { m_RID = value; }
        }

        #endregion

        #region SchoolCode

        private string m_SchoolCode;

        public string SchoolCode
        {
            get { return m_SchoolCode; }
            set { m_SchoolCode = value; }
        }

        #endregion

        #region SchoolMark

        private string m_SchoolMark;

        public string SchoolMark
        {
            get { return m_SchoolMark; }
            set { m_SchoolMark = value; }
        }

        #endregion

        #region AreaID

        private int m_AreaID;

        public int AreaID
        {
            get { return m_AreaID; }
            set { m_AreaID = value; }
        }
        #endregion

        #region SchoolName

        private string m_SchoolName;

        public string SchoolName
        {
            get { return m_SchoolName; }
            set { m_SchoolName = value; }
        }

        #endregion

        #region SchoolOpt

        private short m_SchoolOpt;

        public short SchoolOpt
        {
            get { return m_SchoolOpt; }
            set { m_SchoolOpt = value; }
        }

        #endregion

        #region SchoolYear

        private int m_SchoolYear;

        public int SchoolYear
        {
            get { return m_SchoolYear; }
            set { m_SchoolYear = value; }
        }

        #endregion

        #region SchoolTerm

        private byte m_SchoolTerm;

        public byte SchoolTerm
        {
            get { return m_SchoolTerm; }
            set { m_SchoolTerm = value; }
        }

        #endregion

        #region IsEffect

        private bool? m_IsEffect;

        public bool? IsEffect
        {
            get { return m_IsEffect; }
            set { m_IsEffect = value; }
        }

        #endregion

        #region Rewrite Equals and HashCode

        /// <summary>
        /// 
        /// </summary>
        public override bool Equals(object obj)
        {
            if (this == obj) return true;
            if ((obj == null) || (obj.GetType() != GetType())) return false;
            SchoolInfo castObj = (SchoolInfo)obj;
            return (castObj != null)
 && m_RID == castObj.RID;
        }

        /// <summary>
        /// 用唯一值实现GetHashCode
        /// </summary>
        public override int GetHashCode()
        {
            int hash = 4;
            hash = hash * 4
 * m_RID.GetHashCode(); return hash;
        }

        #endregion


    }
}